package com.shangxian.giveithome.utils;

import com.shangxian.giveithome.mapper.PetMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;


@Slf4j
@Component
public class TaskTool {

    @Resource
    private PetMapper petMapper;

    // 更新该用户所有数据所关联的机构id
    @Async("taskExecutor")
    public void updateAllDataMeId(Long userId, Long meId) {
        petMapper.updateAllDataMeId(userId, meId);
    }

}
